import React, { Component } from "react";
import { Row, Col } from "antd";
import FileViewer from "react-file-viewer";

export class viewPaper extends Component {
    state = {
        url:''
    }
  componentWillMount = () => {
    console.log(this.props.location);
    this.setState({
      url: this.props.location.search.split("=")[1],
    });

  };
  render() {
    return (
      <div>
        <Row justify="center">
          <Col span={14}>
            <FileViewer
              fileType="pdf"
                filePath={"/file/paper/"+this.state.url}
            />
          </Col>
        </Row>
      </div>
    );
  }
}
export default viewPaper;
